<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>

<form action="calc_result.jsp">
	<%
		String n1 = request.getParameter("n1");
		String n2 =request.getParameter("n2");
		String flag =request.getParameter("flag");
		Integer n3 =(Integer)request.getAttribute("n3");	
	%>
	
	<input name = "n1" value="<%=n1==null?"":n1%>">
	<select name="flag">
		<option value="+"<%="+".equals(flag)?"selected":"" %>>+</option>
		<option value="-"<%="-".equals(flag)?"selected":"" %>>-</option>
		<option value="*"<%="*".equals(flag)?"selected":"" %>>*</option>
		<option value="/"<%="/".equals(flag)?"selected":"" %>>/</option>
	</select>
	<input name = "n2" value="<%=n2==null?"":n2%>">
	<input type = "submit" value="=">
	
	<input name = "n3" value="<%=n3==null?"":n3%>">
	
</form>
	
</body>
</html>